<template>
  <div class="editor-cont">
    富文本编辑器
    <textarea id="default-editor">
      {{ richText }}
    </textarea>
  </div>
</template>

<script>
export default {
  data() {
    return {
      richText: `<h1 data-mce-style="text-align: center;" style="text-align: center;"><strong>默认标题文字</strong></h1>`,
    };
  },
  mounted() {
    tinymce.init({
      selector: "textarea#default-editor",
    });
  },
};
</script>

<style lang="scss" scoped>
/* #default-editor {
  height: 600px;
} */
.editor-cont :deep(.mce-edit-area) {
  height: 540px;
}
</style>
